from selenium.webdriver.common.by import By

from base.page_base import BasePage


class Investment(BasePage):
    invest_list=(By.XPATH,'/html/body/div[1]/div/div[2]/div/ul/li[2]/a')
    immediately_invest=(By.XPATH,'/html/body/div[3]/div[2]/div/div[2]/div/div[1]/div[1]/div[2]/div[2]/a')
    input_money=(By.ID,'money')
    click_invest=(By.XPATH,'//*[@id="tender_form"]/p[4]/input[2]')
    def click_invest_list(self):
        self.base_click(self.invest_list)
    def click_immediately_invest(self):
        self.base_click(self.immediately_invest)
    def input_input_money(self,money):
        self.base_input(self.input_money,money)
    def click_immediately(self):
        self.base_click(self.click_invest)
    def investment_flow(self,money='2000'):
        self.click_invest_list()
        self.click_immediately_invest()
        self.input_input_money(money)
        self.click_immediately()